<?php

namespace App\Http\Controllers;

use App\Models\Alarm;
use Illuminate\Http\Request;

class AlarmController extends Controller
{
    public function index(Request $request)
    {
        $data = Alarm::with('ESCluster')->requestCriteria($request)->paginate($request->query('limit'));
        return $this->respondSuccess($data);
    }

    public function show(Alarm $alarm)
    {
        $alarm->load(['ESCluster']);
        return $this->respondSuccess($alarm);
    }
}
